package com.jwgf.common;


import androidx.fragment.app.Fragment;

public class FragmentFactory {
	public static Fragment createInstance(String className){
		Fragment frag = null;
		try {
			frag = (Fragment) Class.forName(className).newInstance();
		} catch (InstantiationException e) {
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			e.printStackTrace();
		}
		return frag;
	}
	
	public static String createTag(String className){
		return AppContext.getInstance().getPackageName() + ".ui." + className;
	}
}
